package Bebetter.Day03;

import java.util.Scanner;

/**
 * @Author:galaxy_yan
 * @Date: 2022/11/24
 * @Time: 21:12
 * @Description计算糖果
 */
public class B1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
//        A-B
        int a=sc.nextInt();
//        B-C
        int b= sc.nextInt();
//        A+B
        int c=sc.nextInt();
//        B+C
        int d=sc.nextInt();

        if((a+c)>0 &&(b+d)>0 && (d-b)>0){
            if((a+c)%2==0 &&(b+d)%2==0 && (d-b)%2==0 ){
                System.out.print((a+c)/2+" "+(b+d)/2+" "+(d-b)/2);
            }
        }
    }
}
